<include file="public:top" />
<!--网站设置-->
<body class="body">
<style type="text/css">
    .red {color: #FF5722!important;}
    .green {color: #5FB878!important;}
</style>
<fieldset class="layui-elem-field layui-field-title" style="margin-top:0px;">
    <legend>{$menuid|getmenuname}</legend>
</fieldset>
<form class="layui-form layui-form-pane" action="">
    <div class="my-btn-box">
      <span class="fl">
        <blockquote class="layui-elem-quote">提示：如分类下文档数量为 0 ，则前台分类列表不显示。</blockquote>
     </span>
     <span class="fr">
        <a class="layui-btn layui-btn-normal" id="btn-add">添加分类</a>
     </span>
    </div> 
</form>
<form class="layui-form layui-form-pane" action="">
    <table class="layui-table">
        <colgroup>
            <col width="50">
            <col width="">
            <col width="100">
            <col width="100">
            <col width="100">
            <col width="200">
 
        </colgroup>
        <thead>
        <tr>
            <th>ID</th>
            <th>分类名称</th>
            <th>文档数</th>
            
            <th>{:L('sort_order')}</th>
            <th>是否启用</th>
            <th>管理操作</th>
        </tr>
        </thead>
         <tbody id="userList">
            {$list}
        </tbody>

    </table>
</form>
<div id="test-laypage-demo0">
  <div class="layui-box layui-laypage layui-laypage-default" id="layui-laypage-29">
  {$page}
  </div>
</div>
<script type="text/javascript" src="__PUBLIC__/admin/layui/layui.js"></script>
<script>
//Demo
layui.use(['layer','jquery','form','element','table'], function () {
   // 操作对象
    var layer = layui.layer,$ = layui.jquery,form = layui.form, element = layui.element,table = layui.table;

    //添加二级
    $(function(){
        $("tbody#userList tr td #add").click(function() {
            var s_title   = $(this).attr('data-title'), s_url = $(this).attr('data-uri') ;  
             layer.open({
              type: 2,
              title: s_title,
              area: ['600px', '420px'],
              fixed: true, //不固定
              maxmin: true,
              content: s_url
            });
        });
    });

    //参数：layui、名称、模块名、主键（删除用）
    //新增弹窗
    Oper.config.add.width = '600px';
    Oper.config.add.height = '420px';

    //编辑弹窗
    Oper.config.edit.width = '600px';
    Oper.config.edit.height = '420px';
    Oper.initList(layui, '文档分类', 'doc_cate', 'id');

});
</script>
</body>
</html>